package eu.dominicum.clavis.ui.web.jsf.view.beans;

import javax.faces.event.PhaseEvent;
import javax.inject.Inject;

/**
 * Base backing bean for common view stuff.
 *
 * @author Harry Klerks
 * @since 0.1M1
 */
public abstract class AbstractBaseBean {

    private String outcome;
    @Inject
    private ClavisSessionBean session;

    public String action() {

        return outcome;
    }

    public void setOutcome(String outcome) {

        this.outcome = outcome;
    }

    /**
     * Dummy before phase event handler for all view tags.
     * Override in your bean if you want something to happen.
     *
     * @param event
     */
    public void beforePhase(PhaseEvent event) {

    }

    /**
     * Dummy after phase event handler for all view tags.
     * Override in your bean if you want something to happen.
     *
     * @param event
     */
    public void afterPhase(PhaseEvent event) {

    }

    public ClavisSessionBean getSession() {
        return session;
    }

    public void setSession(ClavisSessionBean session) {
        this.session = session;
    }
}
